﻿using RBAC.MaHaiBo.API.Application.Command.UserCommand;
using RBAC.MaHaiBo.Repository;
using MediatR;
using RBAC.MaHaiBo.Service;
using RBAC.MaHaiBo.Entity;
using System.Security.Claims;

namespace RBAC.MaHaiBo.API.Application.CommandHandlers.UserHandler
{
    public class UserShowCommandHandlers : IRequestHandler<UserShowCommand, FenYeDTO<UserInfoDTO>>
    {
        IUserService User;

        public UserShowCommandHandlers(IUserService User)
        {
            this.User = User;
        }

        public async Task<FenYeDTO<UserInfoDTO>> Handle(UserShowCommand request, CancellationToken cancellationToken)
        {
            return await User.GetUser(request.poageiden, request.pageSzen, request.Name);
        }

    }

}
